import { createStore, combineReducers, applyMiddleware } from 'redux'
// 使 action 可以执行 异步函数
import thunk from 'redux-thunk'

// 接入redux 插件
import { composeWithDevTools } from 'redux-devtools-extension'

// 模块 reducer
import { login } from './reducers/login'
// 合并 后 的跟 reducer
const rootReducer = combineReducers({
  login
})
// 创建store
export const store = createStore(rootReducer, composeWithDevTools(applyMiddleware(thunk)))
